<template>
  <div class="details">
      <h3>{{list.title}}</h3>
        <img :src="list.pic" class="img">
      <div v-html="list.content" class="newscontent"></div>      
  </div>
  
</template>
<script>
export default {
  data() {
    return {
        list:[]
    };
  },
  methods: {},
  mounted() {
    let id = this.$route.query.id;
    this.$API.getNewsData({ params: { id: id } }).then((res) => {
      console.log(res);
      this.list=res.data.data
    });
  },
};
</script>
<style lang="scss">
.details{
   .img{
        width: 20rem;
    height:10rem;
    display: block;
    margin: 0 auto;
   }
}
.newscontent{
    padding: 0px 5px;
    box-sizing: border-box;
}
</style>